/**
 * @param {number[]} grades
 * @return {number}
 */
var maximumGroups = function (grades) {
    let res = 0,len = grades.length
    while(true){
      res++
      len-=res
      if(len<=res) return res
    }
};